package Package.IOStream.ByteStreamReadsTheData;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class ByteStreamReadsTheData_1 {
public static final void ByteStreamReadsTheData_1() throws IOException {
    FileInputStream Fis=new FileInputStream("D:\\insert\\java.txt");
    int read = Fis.read();
    System.out.println(read);
    System.out.println((char)read);
//    如果文件到达末尾返回值为-1
    int read1 = Fis.read();
    System.out.println(read1);
    System.out.println((char) read1);

    Fis.close();
}
}
